Remove invalidate_maybe_recurse and process_updates from the paintable interface
authorRichard Hult <richard@imendio.com>
Mon, 26 Jan 2009 18:29:26 +0000 (19:29 +0100)
committerAlexander Larsson <alex@localhost.localdomain>
Thu, 2 Apr 2009 08:15:27 +0000 (10:15 +0200)
Replace them with two new functions
_gdk_windowing_{before,after}_process_all_updates() that are called
around the guts of gdk_window_process_all_updates(). Add empty ones
for X11 (nothing more needed), quartz ones will be implemented next.

gdk/gdkinternals.h
gdk/gdkwindow.c
gdk/x11/gdkwindow-x11.c

index a682d596b8919b0c434c7ee0f6e647e466c2a396..781a79957628ae97c7bd51be7c39e1def3176724 100644 (file)
@@ -366,6 +366,8 @@ void _gdk_windowing_got_event                (GdkDisplay       *display,
 
 void _gdk_windowing_window_process_updates_recurse (GdkWindow *window,
                                                     GdkRegion *expose_region);
+void _gdk_windowing_before_process_all_updates     (void);
+void _gdk_windowing_after_process_all_updates      (void);
 
 /* Return the number of bits-per-pixel for images of the specified depth. */
 gint _gdk_windowing_get_bits_for_depth (GdkDisplay *display,
@@ -404,13 +406,6 @@ struct _GdkPaintableIface
                                      GdkWindow       *window,
                                      const GdkRegion *region);
   void (* end_paint)                (GdkPaintable    *paintable);
-
-  void (* invalidate_maybe_recurse) (GdkPaintable    *paintable,
-                                    const GdkRegion *region,
-                                    gboolean       (*child_func) (GdkWindow *, gpointer),
-                                    gpointer         user_data);
-  void (* process_updates)          (GdkPaintable    *paintable,
-                                    gboolean         update_children);
 };
 
 GType _gdk_paintable_get_type (void) G_GNUC_CONST;
index 8e75c0ac46dc8a47d92e1e9f1d21e6bcd8798946..6e96be9d364c28ae51ea2445fe6d8ae9607de1a3 100644 (file)
@@ -4525,6 +4525,12 @@ gdk_window_process_all_updates (void)
 {
   GSList *old_update_windows = update_windows;
   GSList *tmp_list = update_windows;
+  static gboolean in_process_all_updates = FALSE;
+
+  if (in_process_all_updates)
+    return;
+
+  in_process_all_updates = TRUE;
 
   if (update_idle)
     g_source_remove (update_idle);
@@ -4532,6 +4538,8 @@ gdk_window_process_all_updates (void)
   update_windows = NULL;
   update_idle = 0;
 
+  _gdk_windowing_before_process_all_updates ();
+
   g_slist_foreach (old_update_windows, (GFunc)g_object_ref, NULL);
   
   while (tmp_list)
@@ -4554,6 +4562,10 @@ gdk_window_process_all_updates (void)
   g_slist_free (old_update_windows);
 
   flush_all_displays ();
+
+  _gdk_windowing_after_process_all_updates ();
+
+  in_process_all_updates = FALSE;
 }
 
 /**
@@ -4580,16 +4592,6 @@ gdk_window_process_updates (GdkWindow *window,
 
   g_return_if_fail (GDK_IS_WINDOW (window));
 
-  if (GDK_IS_PAINTABLE (private->impl))
-    {
-      GdkPaintableIface *iface = GDK_PAINTABLE_GET_IFACE (private->impl);
-
-      if (iface->process_updates)
-        iface->process_updates ((GdkPaintable*)private->impl, update_children);
-
-      return;
-    }
-
   impl_window = gdk_window_get_impl_window (private);
   if ((impl_window->update_area ||
        impl_window->outstanding_moves) &&
@@ -4723,16 +4725,6 @@ gdk_window_invalidate_maybe_recurse (GdkWindow       *window,
   if (private->input_only || !GDK_WINDOW_IS_MAPPED (window))
     return;
 
-  if (GDK_IS_PAINTABLE (private->impl))
-    {
-      GdkPaintableIface *iface = GDK_PAINTABLE_GET_IFACE (private->impl);
-
-      if (iface->invalidate_maybe_recurse)
-        iface->invalidate_maybe_recurse ((GdkPaintable*)private->impl, 
-                                         region, child_func, user_data);
-      return;
-    }
-
   visible_region = gdk_drawable_get_visible_region (window);
   gdk_region_intersect (visible_region, region);
 
index efb8a2c74ace2fab43bea644a81ed6e68b8cecc4..87e2dcc3ff927fb63f1136ed0f9c7996f3192530 100644 (file)
@@ -5519,6 +5519,16 @@ _gdk_windowing_window_process_updates_recurse (GdkWindow *window,
   _gdk_window_process_updates_recurse (window, expose_region);
 }
 
+void
+_gdk_windowing_after_process_all_updates (void)
+{
+}
+
+void
+_gdk_windowing_after_process_all_updates (void)
+{
+}
+
 static void
 gdk_window_impl_iface_init (GdkWindowImplIface *iface)
 {